
<script type="text/javascript">
  // initialise plugins
  jQuery(function(){
    jQuery('ul.sf-menu').superfish();
  });
</script>

<?php $documentTable = Engine_Api::_()->getDbTable('documents', 'application');
$documents = $documentTable->fetchAll(
  $documentTable->select()
    ->from($documentTable->info('name'), array('document_id', 'title'))
);
?>
<div id="menu">
  <ul class="sf-menu">
    <li class="current">
      <a href="<?php echo $this->url(array(
        'controller' => 'index',
        'module' => 'default',
        'action' => 'index'
      ),NULL, true);?>">Главная</a>
    </li>
    <li>
      <a href="#a">Соревнования</a>
      <ul>
        <li>
          <a href="#aa">Сезоны</a>
        </li>
        <li>
          <a href="#ab">Лига чемпионов</a>
        </li>

        <li>
          <a href="#">Sun City Cup</a>
        </li>

        <li>
          <a href="#">Tennisi Cup</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="#">Галерея</a>
    </li>
    <li>
      <a href="<?php echo $this->url(array(
        'controller' => 'document',
        'action' => 'index',
      ), NULL, true);?>">Документы</a>
      <ul>
        <?php foreach ($documents as $document): ?>
          <li>
            <a href="<?php echo $this->url(array(
              'module' => 'default',
              'controller' => 'document',
              'action' => 'view',
              'document_id' => $document->document_id
            ), NULL, true);?>"> <?php echo $document->title;?></a>
          </li>
        <?php endforeach; ?>
      </ul>
    </li>

    <li>
      <a href="#">Команды</a>
      <ul>
        <li>
          <a href="#">Pr. Division</a>
        </li>
        <li>
          <a href="#">1 Division</a>
        </li>
        <li>
          <a href="#">2 Division</a>
        </li>
        <li>
          <a href="#">3 Division</a>
        </li>
      </ul>
    </li>

    <li>
      <a href="<?php echo $this->url(array('module' => 'forum', 'controller' => 'topic', 'action' => 'view'), null, true) ?>">Форум</a>
    </li>
    <li>
      <a href="#">О Нас</a>
    </li>
  </ul>
</div>